export const updateTime = () => {
  let currentTime = ""
  var now = new Date()
  var hours = now.getHours()
  var minutes = now.getMinutes().toString().padStart(2, "0")
  var seconds = now.getSeconds().toString().padStart(2, "0")
  var timeString = hours + ":" + minutes + ":" + seconds
  currentTime = timeString
  return currentTime
}

export const gettime = () => {
  let mes = ""
  const now = new Date()
  const hour = now.getHours()
  if (hour >= 6 && hour < 12) {
    mes = "早上"
  } else if (hour >= 12 && hour < 18) {
    mes = "中午"
  } else {
    mes = "晚上"
  }
  return mes
}
